<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>四则运输</title>
</head>
<body>
    <script>
        let num1 = parseInt(prompt("请输入第一个数"));
        let num2 = parseInt(prompt("请输入第二个数"));
        let opr = prompt("请输入运算符");
        let result = null;
        switch (opr) {
            case "+":
                result = num1 + num2;
                break;
            case "-":
                result = num1 - num2;
                break;
            case "*":
                result = num1 * num2;
                break;
            case "/":
                result = num1 / num2;
                break;
        }
        console.log("两数运输结果:",num1,opr,num2,"=",result);
    </script>
</body>
</html>